Skip to content

Conversation

rjl493456442
Copy link
Member

@rjl493456442 rjl493456442 commented Aug 13, 2025

This PR is the first step in the trienode history series.

It introduces the nodeWithOrigin struct in the path database, which tracks the original
values of dirty nodes to support trienode history construction.

Note, the original value is always empty in this PR, so it won't break the existing journal
for encoding and decoding. But the compatibility of journal should be handled in the
following PR.

}
}
for _, addr := range deletes {
Copy link
Member Author

@rjl493456442 rjl493456442 Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apply trie insert/update before deletions to avoid loading siblings of deleted nodes within fullNode.

} else {
err = st.Update(tkey.Bytes(), val)
err := st.Update(tkey.Bytes(), val)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apply trie insert/update before deletions to avoid loading siblings of deleted nodes within fullNode.

return err
}
// Short circuit if the origins are not tracked
if len(s.nodeOrigin) == 0 {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original values are not encoded into the journal if they are not provided.

@rjl493456442 rjl493456442 added this to the 1.16.4 milestone Sep 1, 2025
@fjl fjl removed the status:triage label Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants